package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "app端用户管理")
public class ApUserController {

    @Autowired
    ApUserService apUserService;

    @ApiOperation("根据id查询apUser信息")
    @GetMapping("/api/v1/user/{id}")
    public ResponseResult<ApUser> findApUserById(@PathVariable("id") Integer apUserId){
       return ResponseResult.okResult(apUserService.getById(apUserId));
    }

}
